# Generated by Django 4.1.2 on 2022-12-18 12:45

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id_category', models.AutoField(db_column='ID_category', primary_key=True, serialize=False)),
                ('category_name', models.CharField(db_column='categoryName', max_length=50, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id_client', models.AutoField(db_column='ID_client', primary_key=True, serialize=False)),
                ('social_card_number', models.IntegerField(db_column='socialCardNumber', unique=True)),
                ('client_address', models.CharField(db_column='clientAddress', max_length=100)),
                ('client_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id_status', models.AutoField(db_column='ID_status', primary_key=True, serialize=False)),
                ('status', models.CharField(db_column='status', max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Worker',
            fields=[
                ('id_worker', models.AutoField(db_column='ID_worker', primary_key=True, serialize=False)),
                ('worker_type', models.CharField(db_column='workerType', max_length=30)),
                ('photo', models.CharField(blank=True, db_column='photo', max_length=100, null=True)),
                ('description', models.CharField(blank=True, db_column='description', max_length=200, null=True)),
                ('worker_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id_service', models.AutoField(db_column='ID_service', primary_key=True, serialize=False)),
                ('service_name', models.CharField(db_column='serviceName', max_length=30)),
                ('price', models.IntegerField(blank=True, db_column='price', null=True)),
                ('image', models.CharField(blank=True, db_column='image', max_length=100, null=True)),
                ('description', models.CharField(blank=True, db_column='description', max_length=200, null=True)),
                ('id_category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Pensione.category')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id_order', models.AutoField(db_column='ID_order', primary_key=True, serialize=False)),
                ('order_date', models.DateTimeField(auto_now_add=True, db_column='orderDate')),
                ('sum', models.BigIntegerField(default=0)),
                ('id_client', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Pensione.client')),
                ('id_manager', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='Pensione.worker')),
                ('status', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Pensione.status')),
            ],
        ),
        migrations.CreateModel(
            name='Choice',
            fields=[
                ('id_choice', models.AutoField(db_column='ID_choice', primary_key=True, serialize=False)),
                ('reservation_date_start', models.DateTimeField(db_column='reservationDateStart', null=True)),
                ('reservation_date_end', models.DateTimeField(db_column='reservationDateEnd', null=True)),
                ('comment', models.CharField(blank=True, db_column='comment', max_length=250, null=True)),
                ('id_order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Pensione.order')),
                ('id_service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Pensione.service')),
                ('id_worker', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='Pensione.worker')),
            ],
        ),
    ]
